<!-- 登录 -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>登录</title>
    <link rel="stylesheet" href="../../assets/css/reset.css" />
    <link rel="stylesheet" href="../../plugins/swiper/swiper-bundle.css" />
    <link rel="stylesheet" href="./index.css" />
  </head>
  <body>
    <div class="invitation" id="login">
      <div class="top">
        <div class="language">
          <span class="cn">中文</span>
          <span class="icon-checkout"></span>
        </div>
        <div class="code">
          <div class="code-title">登陆</div>
          <div class="welcome">招商证券，欢迎您~</div>
        </div>
      </div>
      <div class="form">
        <div class="form-item">
          <div class="form-title">账号</div>
          <input type="text" placeholder="请输入账号" class="ipt" />
        </div>
        <div class="form-item">
          <div class="form-title">密码</div>
          <div class="pwd">
            <input :type="type" placeholder="请输入密码" class="ipt" />
            <span
              class="eye"
              @click="changeType"
              v-if="type=== 'password'"
            ></span>
            <span class="eye-open" @click="changeType" v-else></span>
          </div>
        </div>
        <div class="btn">登录</div>
        <div class="txt-btns">
          <div class="left">立即开户</div>
          <div class="right">忘记密码</div>
        </div>
      </div>
      <div class="privacy">
        <div @click="changeImg">
          <img :src="url" alt="" />
          <span> 我已阅读并同意 </span>
        </div>
        <span class="blue">《服务条款》《隐私政策》</span>
      </div>
    </div>
  </body>
  <script src="../../assets/js/rem.js"></script>
  <script src="../../plugins/vue/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#login',
      data() {
        return {
          checkboxActiveUrl: '../../assets/images/login/checkbox-active.png',
          checkboxUrl: '../../assets/images/login/checkbox.png',
          url: '../../assets/images/login/checkbox.png',
          type: 'password'
        }
      },
      methods: {
        changeImg() {
          this.url =
            this.url === this.checkboxActiveUrl
              ? this.checkboxUrl
              : this.checkboxActiveUrl
        },
        changeType() {
          this.type = this.type === 'password' ? 'text' : 'password'
        }
      }
    })
  </script>
</html>
